<?php
    include_once('db.php'); 

    $corte =  $_POST['corte'];
    $empresa = $_POST['id_empresa'];
    $intereses = $_POST['intereses'];
    $fecha = $_POST['fecha'];


    //hacemos update en quincenas para marcar las que aplican para el corte 1
    $sql = "update quincena_calculo set intereses_generados = $intereses where fecha ='$fecha' and id_corte = $corte and id_empresa = $empresa ";
    mysql_query($sql, $link);
    // comprobar inserción
    $my_error = mysql_error($link);
    if (!empty($my_error)) {
        echo "Ha habido un error al insertar los valores de tabla quincenas. $my_error";
    } else{

    }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Saade: Captura de facturas de clientes</title>
        <link rel="stylesheet" type="text/css" href="css/index.css" />
        <link rel="stylesheet" type="text/css" href="css/form.css" />  
        <link rel="stylesheet" href="css/example.css" TYPE="text/css" MEDIA="screen">
        <script type="text/javascript" src="js/bsn.AutoSuggest_c_2.0.js"></script>
        <script src="js/jquery-1.2.6.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="js/tabber.js"></script>
        <script type="text/javascript">

            /* Optional: Temporarily hide the "tabber" class so it does not "flash"
            on the page as plain HTML. After tabber runs, the class is changed
            to "tabberlive" and it will appear. */

            document.write('<style type="text/css">.tabber{display:none;}<\/style>');
        </script>
        <script>
            function cerrar()
            {
                parent.$.fancybox.close();
            }
        </script>
        <script type="text/javascript" src="js/jquery.tools.min.js"></script>

    </head>
    <body style="margin: 0px; padding: 0px;" >
        <div class="header_fancy">
            <div class="cerrar_fancy" onclick="cerrar();"></div> 
            <p style="margin-left: 23px; padding-top: 20px; margin-top:0px">ESTATUS DE EMPRESA</p>

        </div>
        <table id="forma" align="center">
            <tr>
                <td> 
                    <span class="input_fancy2">SE HA CAMBIADO EL VALOR DE LOS INTERESES.</span>

                </td>
            </tr>
        </table>
    </body>
</html>
        
